//导入项目已经封装好的request请求
import request from '@/utils/request'
//为trackMark写接口
export const reqTradeMarkList = (page,limit)=>request({
    url:`/admin/product/baseTrademark/${page}/${limit}`,
    method:"get"
});
//POST /admin/product/baseTrademark/save  
//增加品牌
// PUT /admin/product/baseTrademark/update  修改品牌
export const addorupdataTradeMarkList = (tradeMark)=>{
    if(tradeMark.id){
        return request({url:`/admin/product/baseTrademark/update`,
        data:tradeMark,
        method:"put"})
    }else{
        return request({url:`/admin/product/baseTrademark/save`,
        data:tradeMark,
        method:"post"})
    }
};
//删除接口
export const reqDeleteTradeMark = (id)=>request({
    url:`/admin/product/baseTrademark/remove/${id}`,
    method:'delete'
})